#include <iostream>
#include <functional>
#include <memory>
using namespace std;

int add_function(int a, int b)
{
    cout << "a + b = " << a + b << endl;
    return a+b;
}

class my_add
{
public:
    void add_function_class(int a, int b)
    {
        cout << "a + b = " << a + b << endl;
    }
};

int main()
{
    //function_number bind
    auto new_bind = std::bind(add_function, 1, 2);
    
    //class_number bind
    my_add add;
    auto new_class_bind = bind(&my_add::add_function_class, &add, 1, 2);
    new_class_bind();
    my_add add1;
    auto bind2 = bind(&my_add::add_function_class, &add1, 1, std::placeholders::_1);
    bind2(2);
    
    //using lambda
    auto bind2 = []

    return 0;
}
